import Vue from "vue";
import VueRouter from "vue-router";
import allRoutes from "./generateRouter"
Vue.use(VueRouter);

const routes = [
  // ...allRoutes
  {
    path: "/",
    redirect:"/login",
  },
  {
    path: "/login",
    component: () => import(/*webpackChunkName:'log'*/ "@/pages/Login"),
  },
  {
    path: "/home",
    component: () => import(/*webpackChunkName:'home'*/ "@/pages/home"),
    children: [
      {
        path: "welcome",
        component: () =>
          import(
            /*webpackChunkName:'welcome'*/ "@/pages/home/welcome/index.vue"
          ),
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
